package com.ybk.zs.service.impl;

import java.util.List;

import com.ybk.zs.dao.CustomerMapper;
import com.ybk.zs.domain.Customer;
import com.ybk.zs.domain.CustomerExample;
import com.ybk.zs.service.ICustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * customer
 */
@Service
public class CustomerService implements ICustomerService {

    @Autowired(required = false)
    private CustomerMapper customerMapper;

    public int countByExample(CustomerExample example) {
        int count = this.customerMapper.countByExample(example);
        return count;
    }

    public List<Customer> selectByExample(CustomerExample example) {
        return this.customerMapper.selectByExample(example);
    }

    public int deleteByExample(CustomerExample example) {
        return this.customerMapper.deleteByExample(example);
    }


    public int insert(Customer record) {
        return this.customerMapper.insert(record);
    }

    public int insertSelective(Customer record) {
        return this.customerMapper.insertSelective(record);
    }

    @Override
    public int updateByExampleSelective(Customer record, CustomerExample example) {
        return this.customerMapper.updateByExampleSelective(record,example);
    }

    @Override
    public int updateByExample(Customer record, CustomerExample example) {
        return this.customerMapper.updateByExample(record,example);
    }
}